Imports Microsoft.VisualBasic.Devices

Friend Class SystemInfo

#Region "Get hardware properties"

	Friend Shared Function GetRAM() As String

		Dim free As Integer
		Dim total As Integer
		Dim computer As New Computer

		Try

			free = Convert.ToInt32(Convert.ToInt64(computer.Info.AvailablePhysicalMemory) / 1048576)
			total = Convert.ToInt32(Convert.ToInt64(computer.Info.TotalPhysicalMemory) / 1048576)

			Return free & " " & My.Resources.Messages.Free & " / " & total & " " & My.Resources.Messages.Total & " MB"

		Catch
			Return My.Resources.Messages.Undefined
		End Try

	End Function

#End Region

#Region "Get software properties"

	Friend Shared Function GetOS() As String

		Try

			Dim pc As New Computer()

			Return pc.Info.OSFullName

		Catch
			Return My.Resources.Messages.Undefined
		End Try

	End Function

#End Region

End Class